Adaptive memory system for enhancing the performance of an external computing device

ABSTRACT

An adaptive memory system is provided for improving the performance of an external computing device. The adaptive memory system includes a single controller, a first memory type (e.g., Static Random Access Memory or SRAM), a second memory type (e.g., Dynamic Random Access Memory or DRAM), a third memory type (e.g., Flash), an internal bus system, and an external bus interface. The single controller is configured to: (i) communicate with all three memory types using the internal bus system; (ii) communicate with the external computing device using the external bus interface; and (iii) allocate cache-data storage assignment to a storage space within the first memory type, and after the storage space within the first memory type is determined to be full, allocate cache-data storage assignment to a storage space within the second memory type.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a divisional of application Ser. No. 11/972,537,filed Jan. 10, 2008, which claims the benefit of Provisional ApplicationNo. 60/884,378, filed Jan. 10, 2007, the entire disclosures of which arehereby incorporated by reference herein for all purposes.

BACKGROUND

Modern computing devices typically have multiple and differing types ofinternal memory components, which are required to support different endapplications. These memory components and their associatedcharacteristics are some of the crucial metrics by which a computingdevice's performance can be measured. Modern computing devices areusually further capable of functioning with add-on memory componentsthrough various built in communications channels, such as a PCI bus, aFirewire port, a USB port, or a specialized Multi-Media Card (MMC) port.All of these internal and add-on memory components consist of eithervolatile or non-volatile memory, or some combination thereof. Nand Flashand Nor Flash are common types of non-volatile memory. Dynamic RandomAccess Memory (DRAM) and Static Random Access Memory (SRAM) are types ofvolatile memory. Memory type may be classified based on performance anddensity. High performance memories such as SRAM are larger, more costlyto implement, and dissipate more power. Higher density memories, such asDRAM, are more cost effective, but typically have worse performancemeasured by access time for single elements and by the bandwidth, orrate of transfer of the memory contents to the processing elements whichrequire the data or instructions contained in the memory system.

These associated tradeoffs are especially critical when these modernmemory systems are implemented in mobile devices, such as Laptop PCs,cellular phones, PDAs, or any other variety of ultra-portable personalcomputing devices. In such devices, the additional considerations ofpower consumption and form factor make it critical that the memoryresources be optimally configured and utilized. Fortunately, increasinglevels of computer product integration have made it possible to packagemultiple memory types into a single complete memory system package, withfeatures that significantly improve memory data-transfer and associatedprocessing speeds.

One particular application where such integrated packaging is useful isin cache memory systems. Most modern computing systems have integratedcaching systems comprising both a Level 1 and a Level 2 SRAM cache.Typically, a processor uses the cache to reduce the average time toaccess similar data from memory. The SRAM cache is a low-capacity, fastmemory type, which stores copies of frequently accessed data from mainmemory locations.

When a processor attemps to read or write from or to a main memorylocation, it first checks the cache memory location to see if apreviously stored copy of similar data is available. The processor doesthis by comparing the data address memory location with the cache to seeif there is a cache hit (data exists in cache). If the processor doesnot find the data in cache, a cache miss occurs and the processor mustrun at a much slower data retrieval rate as it is required to accessdata from a slower main-memory location, such as a hard-disc or or Flashmemory. It would be advantageous to increase the cache hit in some wayas to reduce the need for accessing the slowest memory type to findfrequently accessed data.

Further still, most modern add-on cache memory systems include Flashmemory and RAM memory wherein the Flash control occurs off-circuit atthe external computing device's processor. This type of system isinefficient, because transfer between the Flash and RAM memory must befacilitated by routing data from the add-on memory system's Flash,across an external processor bus to the external computing deviceprocessor, and back across the external processor bus to the add-onmemory system's RAM.

SUMMARY

This summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This summary is not intended to identify key features ofthe claimed subject matter, nor is it intended to be used as an aid indetermining the scope of the claimed subject matter.

In view of the inefficiencies associated with the prior art memorysystems as discussed in the background section above, the inventors ofthe present application have devised an adaptive memory device whichfacilitates cache expansion using less expensive DRAM technology, whileat the same time allowing direct memory transfer between memorycomponents of the same add-on memory system. Further, the presentinvention may advantageously incorporate specialized caching algorithmsto take advantage of this expanded cache and internal memory access.

In accordance with one embodiment of the present invention, an adaptivememory system is provided for improving the performance of an externalcomputing device. The adaptive memory system includes a singlecontroller, a first memory type (e.g., Static Random Access Memory orSRAM), a second memory type (e.g., Dynamic Random Access Memory orDRAM), a third memory type (e.g., Flash), an internal bus system, and anexternal bus interface. The single controller is configured to: (i)communicate with all three memory types using the internal bus system;(ii) communicate with the external computing device using the externalbus interface; and (iii) allocate cache-data storage assignment to astorage space within the first memory type, and after the storage spacewithin the first memory type is determined to be full, allocatecache-data storage assignment to a storage space within the secondmemory type.

In accordance with one aspect of the present invention, the first andsecond memory types are distinct volatile memory types (e.g., SRAM andDRAM) and the third memory type is a non-volatile type (e.g., Flash),and the single controller is further configured to power down portionsof the first and second memory types that have not been written to, tominimize power consumption.

In accordance with another aspect of the present invention, the singlecontroller may be further configured to transfer cache-data to the DRAMfrom either the SRAM or the Flash Memory. If the cache-data existswithin the SRAM, the cache-data is transferred from the SRAM to theDRAM. If the cache-data does not exist within the SRAM, and does existwithin the Flash Memory, the cache-data is transferred from the FlashMemory to the DRAM.

In accordance with yet another aspect of the present invention, thesingle controller may be further configured to cache data from the Flashmemory to the SRAM and DRAM according to a data look-ahead scheme.

In accordance with another embodiment of the present invention, a methodis provided for controlling an adaptive memory system, wherein theadaptive memory system includes a single controller, a first memorytype, a second memory type, a third memory type, an internal bus system,and an external bus interface. The method includes generally threesteps: (i) communicating with all three memory types using the internalbus system; (ii) communicating with an external computing device usingthe external bus interface; and (iii) allocating cache-data storageassignment to a storage space within the first memory type, and afterthe storage space within the first memory type is determined to be full,allocating cache-data storage assignment within a storage space of thesecond memory type.

In accordance with yet another embodiment of the present invention, acomputer-readable medium including a computer-executable program isprovided for controlling the operation of a single controller of anadaptive memory system. The adaptive memory system further including afirst memory type, a second memory type, a third memory type, aninternal bus system, and an external bus interface. Thecomputer-executable program, when executed, causes the single controllerto perform a method including generally three steps: (i) communicatingwith all three memory types using the internal bus system; (ii)communicating with an external computing device using the external businterface; and (iii) allocating cache-data storage assignment to astorage space within the first memory type, and after the storage spacewithin the first memory type is determined to be full, allocatingcache-data storage assignment to a storage space within the secondmemory type.

In accordance with a further embodiment of the present invention, acomputer-readable medium including a computer-executable program isprovided for implementing a data look-ahead caching scheme of a singlecontroller of an adaptive memory system. The adaptive memory systemfurther including a first memory type, a second memory type, a thirdmemory type, an internal bus system, and an external bus interface. Thecomputer-executable program, when executed, causes the single controllerto perform a method including generally four steps: (i) acquiring asequence of sector data from an application run on an external computingdevice; (ii) comparing the acquired sequence of sector data to aplurality of previously stored sequences of sector data to determine ifthere is a high-probability match; (iii) if a high-probability match isdetermined between the acquired sequence of sector data and theplurality of previously stored sequences of sector data, caching atleast the first memory type with the determined high-probability match;and (iv) if a high-probability match is not determined between theacquired sequence of sector data and the plurality of previously storedsequences of sector data, determining whether a most-likely sequence ofsector data can be selected from the plurality of previously storedsequences of sector data.

In accordance with one aspect of the present invention, if a most-likelysequence of sector data can be selected, a selected most-likely sequenceof sector data is cached into either the first memory type or the secondmemory type; and if a most-likely sequence of sector data cannot beselected, a cache-data training sequence is initiated.

In accordance with another aspect of the present invention, thecache-data training sequence stores the acquired sequence of sector datawithin either the first memory type or the second memory type with anon-volatile copy of the sequence stored in the third memory type.

In accordance with a still further embodiment of the present invention,a method is provided for implementing a data look-ahead caching schemeof a single controller of an adaptive memory system. The adaptive memorysystem includes a single controller, a first memory type, a secondmemory type, a third memory type, an internal bus system, and anexternal bus interface. The method includes generally four steps: (i)acquiring a sequence of sector data from an application run on anexternal computing device; (ii) comparing the acquired sequence ofsector data to a plurality of previously stored sequences of sector datato determine if there is a high-probability match; (iii) if ahigh-probability match is determined between the acquired sequence ofsector data and the plurality of previously stored sequences of sectordata, caching the determined high-probability match data to at least thefirst memory type; and (iv) if a high-probability match is notdetermined between the acquired sequence of sector data and theplurality of previously stored sequences of sector data, determiningwhether a most-likely sequence of sector data can be selected from theplurality of previously stored sequences of sector data.

DESCRIPTION OF THE DRAWINGS

The foregoing aspects and many of the attendant advantages of thisinvention will become more readily appreciated as the same become betterunderstood by reference to the following detailed description, whentaken in conjunction with the accompanying drawings, wherein:

FIG. 1 is a block diagram of the Adaptive Memory System (AMS) inaccordance with one embodiment of the present invention;

FIG. 2 is a block diagram illustrating a traditional memory systeminterface with an external computing device in accordance with the priorart;

FIG. 3 is a block diagram illustrating the AMS file system partitions inaccordance with one embodiment of the present invention;

FIG. 4 is a block diagram illustrating the detailed data flow betweenthe AMS memory components and the processor, facilitated by the AMSController, in accordance with one embodiment of the present invention;

FIG. 5 is a state machine diagram for the AMS Controller illustratingthe data-flow transitions at different operational processing stages, inaccordance with one embodiment of the present invention;

FIG. 6 is a flow diagram illustrating the AMS Controller cache datalook-ahead scheme for filling portions of the AMS SRAM and DRAM cache,in accordance with one embodiment of the present invention;

FIG. 7 is a flow diagram illustrating the training sequence associatedwith the AMS Controller cache data look-ahead scheme, in accordance withone embodiment of the present invention;

FIG. 8 is a flow diagram illustrating the tuning sequence associatedwith the AMS Controller cache data look-ahead scheme, in accordance withone embodiment of the present invention; and

FIG. 9 is a block diagram illustrating the data flow and associatedbandwidth allocation of the AMS Controller, in accordance with oneembodiment of the present invention.

DETAILED DESCRIPTION

The present invention is directed to an Adaptive Memory System (AMS),comprising both volatile and non-volatile memory components and acontroller component that is configured to manage data transfer betweenthe memory components and between the memory components and an externalcomputing device. The memory components and the controller component,collectively called herein as the AMS components, are embodied on aMulti-Chip Package integrated circuit (MCP), which can be configurablydesigned to be removably inserted into any traditional personalcomputing device, such as a desktop PC, a laptop PC, cellular phone, aPDA, or an ultra-mobile PC. The present invention is further directed toa data transfer control scheme implemented by the AMS Controllercomponent, which enhances the overall performance associated withdata-transfer between the AMS and an external computing device.

In accordance with one embodiment, illustrated in FIG. 1, an AMS 10includes multiple AMS memory component types including: Static RandomAccess Memory (SRAM) 14, Dynamic Random Access Memory (DRAM) 16, andFlash Memory 18. It should be understood that the memory component typesof the present embodiment are mere examples of memory types capable offunctioning within the AMS, and that the invention is not limited to theprecise memory types used in the present embodiment. The AMS Controllercomponent (or “Controller” in short) 12 is configured to communicatewith the SRAM, DRAM, and Flash Memory components through an Internal BusSystem 20 and with an external computing device (not shown) through anExternal Bus Interface 22. This configuration allows the AMS Controller12 to completely manage the data flow between the memory components,independent of an external computing device.

In traditional MCP memory devices comprising similar memory componenttypes, as illustrated in FIG. 2, the control for Flash memory datatransfer occurs at an external computing device. For example, when anapplication is run on an external computing device and application datais required to be transferred between a Flash memory component 36 and aRAM memory component 32, 34 of an MCP memory device 30 (e.g., whencaching application page data), the processor of the external computingdevice 40 controls the transfer of the Flash data using an integratedFlash Controller 42. In this system, transferable Flash data must berouted from the MCP memory device's Flash memory component 36 by theexternal computing device's processor 40 across a Flash interface 39 andan external Flash bus 46, and back across a RAM double-data rate (DDR)bus 48 and a RAM interface 38 to the MCP memory device's RAM memorycomponents 32, 34. This data routing scheme is inefficient fortransferring (caching) data between non-volatile (e.g., Flash) andvolatile (e.g., RAM) memory components on the same MCP memory device.

The AMS MCP technology according to various embodiments of the presentinvention, for example as illustrated in FIG. 1, cures this inefficiencyby facilitating Direct Memory Access (DMA) between AMS Flash (18) andRAM (14, 16) memory components, not requiring use of an externalcomputing device's processor. The on-circuit AMS Controller 12 of thepresent invention controls data transfer between a Flash memorycomponent 18 and a RAM memory component 14, 16, such that Flash data canbe directly transferred through the Internal Bus System 20 to a desiredRAM memory component location 14, 16. Because this DMA data-transfercontrol scheme does not require the use of an external computingdevice's processor, it effectively reduces the use of external busbandwidth, wherein the external bus is the bus between the AMS and anexternal computing device. In this way, the external bus bandwidth canbe optimized to allow the external computing device's processor to readand write data from and to the AMS memory components at a much higherrate, according to various embodiments of the present invention.Further, the shorter physical DMA interconnect between the AMS Flashmemory component 18 and the AMS RAM memory components 14, 16 offers alower parasitic capacitance compared with the traditional transferscheme discussed above. Excess parasitic capacitance in circuits isknown to reduce bandwidth, enhance the likelihood of outsideinterference, and increase power consumption during normal circuitoperation conditions. The shorter wire-length data transfer achieved inthe present invention offers a significant power savings when data isrepeatedly transferred between these AMS memory components (e.g., whencaching page data).

Another advantage of decoupling the AMS memory component data transfercontrol from the external computing device's processor is that actualfile management functionality is embedded within the AMS prior toshipment. This allows the AMS to be seen by an external computing deviceas a standard file system. A standard file system can be supported bystandard operating system level drivers, thereby eliminating the needfor maintaining specialized flash-dependant device drivers at theoperating system level. The self-contained flash driver software of theAMS is contained within the Embedded SRAM/DRAM/Flash Installable FileSystem Partition 54 of the AMS File System Partitions 50 illustrated inFIG. 3. Other AMS file system partitions include a standard FAT FileSystem Partition 52 and a Device Configuration Partition 56 includingBoot Partition and Flash Interface data, in the illustrated embodiment.The embedded flash driver software does not require additional testingat the point of integration with an operating system. This independentmemory driver control advantageously allows for the AMS to be recognizedby almost any operating system, without requiring additionalinstallation of specialized memory driver software on the externalcomputing device.

The AMS Controller 12 may be further configured to minimize powerconsumption by selectively gating power flow to portions of the AMS SRAMand DRAM volatile memory components 14, 16. Such a power savingstechnique is preferable because, as is well known in the art, both SRAMand DRAM volatile memory types require a constant power-draw to maintainor refresh existing data held within portions of their respective memoryareas. To minimize this power-draw in the AMS, in various exemplaryembodiments of the present invention, the Controller 12 monitors the RAMmemory components to detect when portions of the SRAM or DRAM 14, 16,are not scheduled to be written to and are not already holding data.Upon detection of an inactive portion of RAM, the Controller 12 powersdown those portions of the inactive SRAM or DRAM 14, 16, to minimizepower loss. In this way, power consumption can be dynamically regulatedfrom within the AMS device, without requiring any input from theprocessor of an external computing device.

According to various exemplary embodiments of the present invention, theAMS, such as seen in FIG. 1, is configured to be used as a high speedadaptive cache with portions of the SRAM 14 functioning as Level 1 andLevel 2 cache partitions, and portions of the DRAM 16 functioning as aLevel 3 cache partition. The high speed cache can operate in conjunctionwith the existing cache system of an external computing device, toadaptively enhance data storage and retrieval for the combined system.The AMS integrated cache is preferably utilized for data transfer anddata storage related to operations associated with: Boot Code Mirror,Program Data, Program Code, and Application Data. The size and Level ofcache used for such functions is dynamically allocated based onconfiguration settings and required performance metrics.

Boot Code Mirror and Program Code

The boot code is copied from the Flash 18 to the SRAM cache 14 torapidly initialize the device processor. This represents the initial useof SRAM cache 14.

Additional program code is identified as data requested from the Flash18. This additional program code may be copied to either SRAM or DRAMcache 14, 16, depending on allocated cache size and availability.Preferably, the SRAM cache 14 is filled prior to DRAM cache 16, as theuse of the DRAM cache consumes more power than the SRAM cache due to theconstantly required refreshing of DRAM data.

Detained Data Flow and Partitioning

FIG. 4 illustrates the data transfer between the AMS Memory Componentsand the AMS Controller 60 in accordance with one embodiment of thepresent invention. In this representation the discrete blocks of Flashdata are referred to as “pages”. These data pages are initiallytransferred from the Flash 80 to the SRAM 62, as indicated by path P1.The pages are then grouped together and cached via path P2 to create ablock of boot code data 64, which is then transferred to the Controller60 via path P3. As part of the initialization sequence or booting, theController 60 will configure the DRAM cache 72 to allow normal operationincluding DRAM access. The Controller 60 then operates using programcode 66 transferred from the SRAM cache 62 via path P5, which was cachedvia path P4 from the SRAM data pages originally sent from the Flash 80via path P1. When the limited capacity of the SRAM cache 62 is exceeded,additional pages of code required to be cached are transferred from theSRAM cache 62 to the DRAM cache 72 via path P6 or, if the SRAM cache 62is determined to be full and the additional pages are not alreadypresent in the SRAM cache 62, they are transferred directly from theFlash 80 to the DRAM 72 via path P7. The Controller 60 can then executeprogram code 74 stored in the DRAM cache 72, accessed via path P12.

Program Data and Application Data

Program and application data fills the AMS memory space from within theInternal Bus System 20 (see FIG. 1). As illustrated in FIG. 4, theController 60 may access blocks of application data or program data 68,70, 76 and 78 in either the SRAM or DRAM cache 62, 72, using paths P10,P11, P14, and P13. To commit application data into the Flash 80, a pageor pages of information must first be assembled in either the SRAM orDRAM cache 62, 72. When the content has been confirmed, the Controller60 indicates that the page or pages are to be “committed” to the Flash80. This is indicated by path P15 “Commit” and by path P16 “Commit.” Thecommitted pages are then written to Flash 80 using path P1. TheController 60 can also request transfer of application data between theSRAM and DRAM blocks 68, 76. Upon request, transfers are scheduled andexecuted as indicated by paths P8 and P9.

Controller Logic and Data Flow

The algorithmic function of the AMS Controller logic, according tovarious exemplary embodiments of the present invention, is configured toperform the following:

-   -   1. To dynamically allocate portions of the SRAM and DRAM devoted        to caching page data, and to adjust such allocation based on        heuristics, preconfigured settings, and historical memory access        information, which are stored in Flash memory. Allocation        requests include requests from the processor for reading and        writing data to the AMS memory components and DMA transfer        requests. Implementation of the memory allocation algorithm is        shown in FIG. 5 and associated tables: TABLE 1 and TABLE 2,        below.    -   2. To fill portions of the SRAM and DRAM cache with data        mirrored from other memory blocks, using the data look-ahead        scheme illustrated in FIGS. 6-8. This data allocation uses        adjustable data bus widths and occurs at rates determined to        minimize power consumption.    -   3. To power off portions of the volatile SRAM and DRAM cache        which have not been written to and which are not determined to        be in use. Initially, these memory components are marked as not        being written to, and each portion of memory is only powered up        as required for caching data.

FIG. 5 illustrates the AMS Controller Data-Flow Diagram in the form of astate machine. TABLE 1 lists the corresponding state definitions andTABLE 2 lists the corresponding state transitions associated with theData-Flow Diagram.

TABLE 1 AMS Controller Data-Flow Diagram State Definitions DRAM SRAM NO.NAME DESCRIPTION DMA OPERATION POWER POWER 1 Boot Processor startingCopy boot code from OFF Component up. DRAM cache Flash to SRAM, Requiredfor not configured. processor boots from boot is on, SRAM. others OFF 2Program Processor running Copy Flash pages to ON ON initial SRAM, DRAMapplications, no caches. Execute data written. DMA requests. 3 ComputeProcessor running Copy Flash pages to ON ON applications with SRAM, DRAMdata manipulation. caches. Transfer SRAM cache overflow to DRAM. ExecuteDMA requests. 4 Low Idle bus from SRAM backup to ON ON Power, processorside. DRAM and commit Bus Idle to flash. Execute DMA requests. 5 StandbyIdle bus from ON OFF processor side. Waiting for activity or power down.6 Power Processor requests Low Down low power state. Power Standby

TABLE 2 AMS Controller Data-Flow Diagram State Transitions TRAN- SITIONFROM STATE TO STATE CRITERIA I Power Up 1 Boot System rest active II 1Boot 2 Program Internal boot initialization sequence completed III 2Program 3 Compute System reset not active; System power down not active;Number of write cycles exceed threshold value IV 2 Program 1 Boot Systemreset active V 2 Program 6 Power Down System power down active VI 3Compute 4 Low Power, Bus No bus access request Idle for duration timeout1 VII 3 Compute 6 Power Down System power down active VIII 3 Compute 1Boot System reset active IX 4 Low Power 5 Standby System power down notactive; No bus access request for duration timeout 2 X 4 Low Power 6Power Down System power down active XI 4 Low Power 3 Compute Systempower down not active; System bus access request detected XII 5 Standby6 Power Down System power down active XIII 5 Standby 2 Program Systempower down not active; System bus access request detected XIV 6 PowerDown 2 Program System bus access request detected

The AMS Controller data look-ahead caching scheme is designed toanticipate what specific data requests will be initiated by theprocessor of an external computing device. The specific code or datapertaining to anticipated data requests can be pre-loaded into ahigh-speed memory device (i.e., cached) to enable it to be rapidlyretrieved at the time the processor makes a request for similar code ordata.

FIG. 6 illustrates the running of this data look-ahead scheme forfilling portions of the AMS SRAM and DRAM cache 14, 16 with sequences ofsector data. A sector of data is the smallest block of data addressableby an operating system, which is typically around 512 bytes. A sequenceof sector data 93 is an arbitrarily ordered set of sector data,characterized by its length. The look-ahead caching scheme of thepresent invention advantageously allows for portions of the Level 1 andLevel 2 SRAM cache 14 as well as portions of the Level 3 DRAM cache 16to be preloaded with predicted sequences of cache data, which areselectively determined through comparison of historical cache data withrun-time application data, in blocks 96, 102, to be described below.

At the time an application is run on an external computing device, as inblocks 90, 92, sequences of acquired application sector data 93 arecompared to each of the previously stored sequences of sector data, asin blocks 94, 96, to determine if a high-probability match can be foundin block 98. Finding of a high-probability match will be described indetail below. If such a high-probability match is comparativelydetermined (Yes at 98) for each stored sequence, the previously storedsequence match is flagged as a high-probability match and preloaded intoeither the SRAM or DRAM cache in block 104, depending on whether thepreferable SRAM cache has already been filled. The determination of sucha high-probability match is based on a high-probability threshold value(or high-probability match (HPM) value), which is measured against thedetermined difference values between a particular sequence of acquiredapplication sector data 93 and each previously stored sequence of sectordata, as in blocks 94, 100. In one embodiment, the high-probabilitythreshold value relates to a percentage value (i.e., 90-95%) of matchingsequence sectors between the acquired application sequences and thepreviously stored sequences. In such an embodiment the determineddifference values would also relate to percentage values in order tofacilitate percentile comparison. If the determined difference value forany previously stored sequence of sector data is less than thehigh-probability threshold value, and also less than the determineddifference value for any other previously stored sequence of sector datafor the same sequence of acquired application sector data (Yes at 98),then that previously stored sequence of sector data is determined to bethe high-probability match associated with the particular sequence ofacquired application sector data 93.

However, if a high-probability match cannot be determined (No at 98),because none of the previously stored sequences of sector data have adetermined difference value lower than the high-probability thresholdvalue, then the lowest determined difference value is compared to alower-precision most-likely sequence threshold value (or most-likelysequence match (MLSM) value), in block 102. In one embodiment, themost-likely sequence threshold value also relates to a percentage valueof matching sequence sectors (i.e., 70-75%) between the acquiredapplication sequences and the previously stored sequences. In such anembodiment the determined difference values would also relate topercentage values in order to facilitate percentile comparison. When thelowest determined difference value is measured to be higher than thehigh-probability threshold value, but lower then the most-likelysequence threshold value (No at 98 and Yes at 102), then that previouslystored sequence of sector data is determined to be the most-likelysequence match associated with the particular sequence of acquiredapplication sector data. In this case, when the most-likely sequencematch is determined (Yes at 102), the associated previously storedsequence match is flagged as a most-likely sequence match and preloadedinto either the SRAM or DRAM cache, in block 104, depending on whetherthe preferable SRAM cache 14 has already been filled.

With the lower-precision most-likely sequence match, the sequence may befurther flagged for re-tuning, as will be described in detail inreference to FIG. 8 below. The need for re-tuning is particularlyindicated by repeat cases where a sequence is identified as amost-likely sequence match, as these sequences are more likely in needof tuning adjustment (i.e., re-ordering of sector data).

If a most-likely sequence match cannot be determined (No at 102),because none of the previously stored sequences of sector data have adetermined difference value lower than the most-likely sequencethreshold value, the AMS Controller 12 determines if the particularacquired sequence of application sector data should be stored, based ona likelihood of error determination in block 106. If No at block 106,retest comparison is implemented. If Yes at block 106, the particularacquired sequence of application sector data should be preloaded intothe cache by initiating a cache training sequence, as will be describedin detail in reference to FIG. 7 below.

FIG. 7 illustrates the running of the AMS Controller cache datalook-ahead training sequence for filling portions of the AMS SRAM andDRAM cache 14, 16, with particular sequences of sector data 113,acquired from an application run on an external computing device, as inblocks 110, 112. After the sequences of application sector data finishloading, time out, or exceed a predetermined size limit, as seen inblock 114, the training sequence progresses to the sequence datareduction block 118, and then cache data storage in block 120 for thepreviously recorded sequences of sector data 116, 122. At the time ofsequence data storage 120 to the either the volatile SRAM 14 or DRAM 16cache, the AMS Controller further sends a copy of the sequence data,designated for cache assignment, to the non-volatile Flash as a backupdata storage device. The data reduction in block 118 is implemented byreplacing sequences of unordered sector data with sequences comprised ofordered ranges of sector data. This reduction creates a more efficientcache storage and retrieval mechanism.

FIG. 8 illustrates the running of the AMS Controller cache datalook-ahead tuning sequence for tuning portions of the AMS SRAM and DRAMcache 14, 16, such that existing sequences of stored sector data 136 arecompared to acquired sequences of application sector data 127, as inblocks 124, 126, 128, and 130. The resulting unordered sequences ofsector data are subsequently tuned into ordered sequences of sector datain block 132, and stored as ranges of ordered sequences 136 in block134. If an initial run of the tuning sequence does not effectivelyrefine the ordering of all sequences of sector data, the tuning sequencewill be repeated.

FIG. 9 illustrates the data flow and associated bandwidth allocation ofthe AMS Controller, in accordance with one embodiment of the presentinvention. In this embodiment, the AMS Controller 138 comprises SRAMInternal Memory Interface(s) 140, DRAM DDR Internal Memory Interface(s)142, and Flash Internal Memory Interface(s) 144, as well as RAM ExternalProcessor Interface(s) 146 and DDR External Processor Interface(s) 148.These combined Controller Interfaces 140, 142, 144, 146, and 148 have atotal bus bandwidth that is significantly larger than that of theexternal computing device's processor bus interface (not shown). Thisexcess bus data transfer capacity allows the AMS Controller 138 todirectly transfer cache data between memory devices (DMA) and at thesame time allows the external computing device's processor to separatelyaccess data from the AMS memory components. This interleaved datatransfer advantageously allows the AMS Controller 138 to operate at anincreased total-data transfer rate.

The actual bus for each AMS memory component device type (SRAM 14, DRAM16, and Flash 18) may be configured to either be of the same base ormultipliers of the same base, depending on the specific size andcapacity characteristics of each implemented memory component. FIG. 9shows an example of a 4:1 difference between the internal bus width forthe internal interface components 140, 142, and 144 and the external buswidth for the external processor interface components 146, 148, whenN=4, and the same bus configurations used for SRAM, when L=4, and theFlash, when M=4.

The AMS Controller's 138 excess bus capacity can be utilized when theexternal computing device's processor accesses DRAM memory through thetwo distinct internal data busses B1 and B2. This interleaved accessallows cache data from consecutive DRAM addresses to be suppliedalternately by two different internal DRAM data busses B1, B2. Thisparallel DRAM data transfer allows the DDR External Processor bus to beoperated at a faster data transfer rate than is required on the internalbus. Simultaneous to this access, DMA data transfers can occur betweenthe Flash 18 and a cache contained in SRAM or DRAM memory devices 14,16, using data busses B3 and B4.

It should be understood that the actual bus bandwidth difference wouldbe different from the theoretical 4:1 factor due to differences inlatency settings and cycle times between actual internal and externalbus implementations. The internal bus supports multiple bus transferprotocols, which likely do not reflect the same protocols used by theexternal processor bus. For example, both versions and settings used bya DDR External Processor protocol are likely substantially differentfrom those used by an internal bus protocol.

One way to increase a data transfer rate (commonly measured in Megabytesper second) for writing data to or reading data from non-volatile memory(e.g., Flash), is to read or write the data to multiple memorycomponents simultaneously. Utilizing this parallel data-transfer scheme,large blocks of data can be transferred as efficiently as possible,using the multiple distinct memory components.

It would be advantageous to be able to facilitate an operating system ofa computing device having as small a read-write data unit size aspossible. Utilizing a smaller minimum unit size (i.e., a data sector)avoids unnecessarily wasting memory storage space when smaller pieces ofinformation are read from or written to memory (e.g., when filedirectory information is encoded with many small pieces of information).Further, utilizing a smaller unit of data also avoids unnecessary writeoperations which might wear out a given recording medium.

Unfortunately, the two goals of achieving faster data transfer rates andsmaller sector size are often in conflict. A means of increasing thedata transfer rate, while maintaining a smaller unit of data size isdesired. In addition, it is desired to accomplish this with both minimalpower loss and minimal required interconnects between MCP components.

As shown in FIG. 9, the AMS Controller 138 includes multiplenon-volatile component interfaces 144 (e.g., Flash Interfaces). Thesemultiple interfaces facilitate reading from and writing to multiplenon-volatile components simultaneously, thereby increasing read andwrite data transfer rates to the multiple components of a singlenon-volatile device. Unfortunately, this introduces an inherentdisadvantage when smaller blocks of data are stored. To overcome thisdisadvantage, the individual non-volatile Flash interfaces 144 of thepresent invention include a feature enabling each of the individualflash components during a single read or write operation. Multipletechniques to accomplish this goal of enabling or disabling componentscan be realized. The first technique is to use individual enable signalsto each non-volatile component. This technique has the advantage ofminimizing the power loss by disabling unused devices during a givenread or write operation. A second technique is to modify the addressesused during a given write operation.

As is well known in the art, non-volatile storage devices, such asFlash, have certain address locations that are known to be defective,and thus cannot be used for storing information. With the secondtechnique, the address locations of the individual components which arenot desired to be written to are set to a location that is known to bedefective. The excess write operation does not disrupt valid storedinformation because this address location is already flagged to bedefective, and information will never be retrieved from this location.This further does not require additional connections to the component,because the address information is already required to be presented tothe component for normal operations. The goal of writing to a subset ofthe components is thus accomplished without additional cost ofconnections between the Controller and the non-volatile storagecomponents.

Additional Interfaces for the AMS

As illustrated in FIG. 1, in one embodiment of the present invention,the AMS MCP integrated circuit is designed to include an Expansion FlashBus 26 and an Expansion DRAM Bus 24, to be coupled with additional DRAMand Flash memory components. As would be understood by one skilled inthe art, additional DRAM and Flash memory components should beconfigured to function with the existing driver software present in theEmbedded SRAM/DRAM/Flash Installable File System 54 within the existingAMS File System Partitions 50 (see FIG. 3). Otherwise, the added DRAM orFlash memory components would require the existing AMS memory componentdrivers to be updated, so that unpredictable errors could be avoided atinstallation.

Further, in one embodiment of the present invention, the AMS MCPintegrated circuit is designed to include an Expansion Bus Interface 28(illustrated in FIG. 1), whereby the Controller is capable ofcommunicating with a secondary computing device through an expansionbus. This Expansion Bus Interface 28 is shown as being independent fromthe Expansion DRAM Bus 24 and the Expansion Flash Bus 26, only forconvenience and clarity, however, it should be recognized that theExpansion Bus Interface 28 could configurably be incorporated intoeither the Expansion DRAM Bus 24 or the Expansion Flash Bus 26, toreduce the AMS Controller pin-count. The Expansion Bus Interface 28effectively allows the AMS Controller to communicate and transfer storeddata to multiple external computing devices simultaneously.

As previously stated, it should be also be understood that the SRAM 14,DRAM 16 and Flash 18 memory components of the present embodiment(illustrated in FIG. 1) are mere examples of memory types capable offunctioning within the AMS, and that the invention is not limited to theprecise memory types used in this embodiment. Alternate technologiesexist which offer similar characteristics and functionality as the abovememory types offer. For example, the implementation of the SRAM 14 couldbe replaced with a type of Pseudo SRAM (PSRAM); the implementation ofthe DRAM 16 could be replaced with a type of Zero Capacitor RAM (ZRAM)or with Twin Transistor RAM (TTRAM); and the implementation of the Flash18 could be specifically designated as NAND or NOR type Flash or couldbe replaced with a type of Phase Change Memory (PCM, PRAM). Clearly theabove listing of alternate memory component types is not exhaustive, andmany other variations could be implemented, while still allowing thepresent invention to function as described above.

1. A computer-readable medium having computer-executable instructionsstored thereon that, if executed by a single controller of an adaptivememory system, causes the single controller to perform actions forimplementing a data look-ahead caching scheme; wherein the adaptivememory system includes a first memory type, a second memory type, athird memory type, an internal bus system, and an external businterface; and wherein the actions comprise: acquiring a sequence ofsector data from an application run on an external computing device;comparing the acquired sequence of sector data to a plurality ofpreviously stored sequences of sector data to determine if there is ahigh-probability match; caching at least the first memory type with adetermined high-probability match if a high-probability match isdetermined between the acquired sequence of sector data and theplurality of previously stored sequences of sector data; and determiningwhether a most-likely sequence of sector data can be selected from theplurality of previously stored sequences of sector data if ahigh-probability match is not determined between the acquired sequenceof sector data and the plurality of previously stored sequences ofsector data.
 2. The computer-readable medium of claim 1, wherein thefirst memory type is Static Random Access Memory (SRAM), the secondmemory type is Dynamic Random Access Memory (DRAM), and the third memorytype is Flash Memory.
 3. The computer-readable medium of claim 1,wherein the actions further comprise: caching a selected most-likelysequence of sector data into either the first memory type or the secondmemory type if a most-likely sequence of sector data can be selected;and initiating a cache-data training sequence if a most-likely sequenceof sector data cannot be selected.
 4. The computer-readable medium ofclaim 3, wherein the cache-data training sequence stores the acquiredsequence of sector data within either the first memory type or thesecond memory type with a non-volatile copy of the sequence stored inthe third memory type.
 5. The computer-readable medium of claim 4,wherein the first memory type is Static Random Access Memory (SRAM), thesecond memory type is Dynamic Random Access Memory (DRAM), and the thirdmemory type is Flash Memory.
 6. A method for implementing a datalook-ahead caching scheme of a single controller of an adaptive memorysystem, wherein the adaptive memory system includes a single controller,a first memory type, a second memory type, a third memory type, aninternal bus system, and an external bus interface, the methodcomprising: acquiring a sequence of sector data from an application runon an external computing device; comparing the acquired sequence ofsector data to a plurality of previously stored sequences of sector datato determine if there is a high-probability match; caching thedetermined high-probability match data to at least the first memory typeif a high-probability match is determined between the acquired sequenceof sector data and the plurality of previously stored sequences ofsector data; and determining whether a most-likely sequence of sectordata can be selected from the plurality of previously stored sequencesof sector data if a high-probability match is not determined between theacquired sequence of sector data and the plurality of previously storedsequences of sector data.
 7. The method of claim 6, wherein the firstmemory type is Static Random Access Memory (SRAM), the second memorytype is Dynamic Random Access Memory (DRAM), and the third memory typeis Flash Memory.
 8. The method of claim 6, further comprising: caching aselected most-likely sequence of sector data into either of the firstmemory type or the second memory type if a most-likely sequence ofsector data can be selected; and initiating a cache-data trainingsequence if a most-likely sequence of sector data cannot be selected. 9.The method of claim 8, wherein the cache-data training sequence storesthe acquired sequence of sector data within either the first memory typeor the second memory type with a non-volatile copy of the sequencestored in the third memory type.
 10. The method of claim 9, wherein thefirst memory type is Static Random Access Memory (SRAM), the secondmemory type is Dynamic Random Access Memory (DRAM), and the third memorytype is Flash Memory.